package com.iengoo.inductionms.ctrl.rest;

import com.iengoo.inductionms.entity.Province;
import com.iengoo.inductionms.service.ProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Author:huermao
 **/
@RestController
@RequestMapping("/province")
public class ProvinceController {
    @Autowired
    private ProvinceService provinceService;
    @GetMapping
    public List<Province> getProvince() {
        List<Province> provinceList = provinceService.queryAll();
        return provinceList;
    }
}
